
from PoDay_12_3.Base import  Base
from selenium.webdriver.common.by import By
import time

class Page(Base):

    # 定位器

    zhanghao_loc=(By.XPATH,'/html/body/div/div/section/section/main/div/div[2]/div[1]/div/div/input')

    mima_loc=(By.XPATH,'/html/body/div/div/section/section/main/div/div[2]/div[2]/div/div/input')

    denglu_loc=(By.XPATH,'/html/body/div/div/section/section/main/div/div[2]/div[2]/div/div/input')


    # 封装元素定位

    def zhanghao(self):
       self.send_keys(self.zhanghao_loc,'liyichi')

    def mima(self):
        self.send_keys(self.mima_loc,'123456')

    def denglu(self):
        self.click(self.denglu_loc)


    #业务逻辑

    def yewu_luoji(self):
        self.open_url('http://localhost:8080/loging')
        time.sleep(10)
        self.zhanghao()
        time.sleep(5)
        self.mima()
        time.sleep(5)
        self.denglu()
        time.sleep(5)



